//无法吃午餐的学生
class Solution {
    public:
        int countStudents(vector<int>& students, vector<int>& sandwiches) {
            queue<int> st(students.begin(),students.end());
            queue<int> sand(sandwiches.begin(),sandwiches.end());
            int oldData = 0;
            bool flag = true;
            while(flag &&!st.empty() &&!sand.empty())
            {
                // 相等,就pop
                if(st.front() == sand.front())
                {
                    oldData = 0;
                    st.pop();
                    sand.pop();
                }
                else //不相等就移动
                {
                    if(oldData == st.size()) flag = false;
                    int data = st.front();
                    st.pop();
                    st.push(data);
                    oldData++;
                }
            }
            return st.size();
        }
    };